<template>
	<div class="custom-container">
		<div style="position: absolute; width: 100%;"><el-button type="primary" style="width: 100%;" @click="handleAddHotspot">添加热点</el-button></div>
		<EditUI v-if="editVisible" :panoData="panoData" ref="editUI" @close="editVisible=false;"></EditUI>
	</div>
</template>

<script>
	import EditUI from './hotspot_edit.vue';
	export default {
		props: ["panoData"],
		components:{
			EditUI
		},
		data() {
			return {
				editVisible: false
			}

		},
		methods: {
			handleAddHotspot() {
				this.editVisible=true;
				this.$nextTick(()=>{
					this.$refs.editUI.addHotspot();
				})
			}
		}
	}
</script>

<style scoped>
	.custom-container {
		position: relative;
		/* 确保子元素可以绝对定位 */
		width: 100%;
		/* 父容器宽度 */
		height: 100%;
		/* 父容器高度 */
	}
</style>